Repository navigation
fix(aggregator): markResult caps never split a surrogate pair (#7711) - #7713
Merged
Merged
Conversation
markResultTransition capped appliedByRun/resultNote with raw slice, storing a lone high surrogate whenever an astral character straddled the 200 / 2000 caps — the #7694 defect class on the result path. Route both caps through the shared capUnits guard extracted from cleanText, and add regression tests (straddle at both caps dropped whole, exact-fit pair kept whole; new test fails pre-fix).
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 8, 2026 13:50
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7711.
markResultTransitioncappedappliedByRun(200) andresultNote(2,000) with rawslice, so an astral character straddling either cap was stored as a lone high surrogate and persisted — the #7694 defect class on the action-result path, which the #7698 fix (cleanText only) did not reach.cleanTextinto a sharedcapUnitshelper;cleanTextuses it unchanged.markResultTransitionnow caps both result fields throughcapUnits— straddling pair dropped whole, cap semantics otherwise identical (no trim/empty changes).actions.test.ts: straddle at both the 200 and 2,000 caps stored whole-or-dropped, exact-fit pair kept whole.Verification (laptop, branch
bcfcd14365):actions.ts,~/git/fleet/probe-actions-result-surrogate): pre-fix both caps stored a lone0xd83dand the persisted file contained\ud83d; post-fix lengths 199 / 1,999, UTF-8 round-trip clean, no\ud83din the persisted file, exact-fit control intact.bun test test/actions.test.ts: 28/28 pass on the branch; the new aggregator(actions): markResult caps split surrogate pairs — appliedByRun/resultNote stored with a lone surrogate (residual of #7694) #7711 test fails on pre-fix code (27 pass / 1 fail with the src change stashed).bunx tsc --noEmit: output identical to clean main (one pre-existing unrelated error intest/roadmap-annotations.test.ts).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.